package com.sunop.api.client.problem;

import com.sunop.api.interceptor.FeignInterceptor;
import com.sunop.api.model.Result;
import com.sunop.api.model.UserRecodeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigInteger;
import java.util.Map;

@FeignClient(value = "problem-service",configuration = FeignInterceptor.class)
public interface ProblemClient {
    @GetMapping("/problem/fegin/selectTimeById")
    public Map<String, BigInteger> selectTimeById(@RequestParam("pid") int pid) ;

    @GetMapping("/problem/fegin/getOutput")
    public String getOutput(@RequestParam("pid") int pid) ;

    @GetMapping("/problem/fegin/getTitleAndDifficulty")
    public Map<String, String> getTitleAndDifficulty(@RequestParam("pid") int pid) ;

    @PostMapping("/problem/saveRecode")
    public Result saveRecode(@RequestBody UserRecodeVO userRecodeVO) ;
}
